Skip to main content
Version: 8.4.08.4

BookControl

V8 Message Definiton

METADATA

AttributeValue
Topic1630-client-book-risk
MLink TokenSystemData
ProductSRControl
accessTypeSELECT,UPDATE,INSERT,DELETE

Table Definition

FieldTypeKeyDefault ValueComment
accntVARCHAR(16)PRI''
clientFirmVARCHAR(16)PRI''SR client firm
bookStatusenum - BookStatus'TwoWay'
bookRiskMultiplierFLOAT1.0book risk multiplier xRM
maxAccHaircutFLOAT1000000xRM max preexpiration target haircut 3750
minAccRhoFLOAT-1000minimum accnt rho ddInt
maxAccRhoFLOAT+1000maximum accnt rho ddInt
minDDeltaINT1000000min accnt delta
maxDDeltaINT1000000max accnt delta
maxAccAbsWtVegaFLOAT10000xRM max account abs wtVega sum of abssymbol net wtVegawtVega ve vol sqrtmax01 years 4
minAccWtVegaFLOAT-1000xRM minimum accnt net wtVega
maxAccWtVegaFLOAT+1000xRM maximum accnt net wtVega
minIndWtVegaFLOAT-1000xRM minimum ind 0 net wtVega applies to each industry unless overriden by an IndustryControl record
maxIndWtVegaFLOAT+1000xRM maximum ind 0 net wtVega applies to each industry unless overriden by an IndustryControl record
minSubWtVegaFLOAT-1000xRM minimum sub 00 net wtVega applies to each subIndustry unless overriden by an IndustryControl record
maxSubWtVegaFLOAT+1000xRM maximum sub 00 net wtVega applies to each subIndustry unless overriden by an IndustryControl record
minGrpWtVegaFLOAT-1000xRM minimum grp 000 net wtVega applies to each indGroup unless overriden by an IndustryControl record
maxGrpWtVegaFLOAT+1000xRM maximum grp 000 net wtVega applies to each indGroup unless overriden by an IndustryControl record
userTextTINYTEXT''free form text
modifiedByVARCHAR(24)''user who last modified this record
modifiedInenum - SysEnvironment'None'
timestampDATETIME(6)'1900-01-01 00:00:00.000000'timestamp of last modification

PRIMARY KEY DEFINITION (Unique)

FieldSequence
accnt1
clientFirm2

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRControl`.`MsgBookControl` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`bookStatus` ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') NOT NULL DEFAULT 'TwoWay',
`bookRiskMultiplier` FLOAT NOT NULL DEFAULT 1.0 COMMENT 'book risk multiplier (xRM)',
`maxAccHaircut` FLOAT NOT NULL DEFAULT 1000000 COMMENT '(xRM) max pre-expiration target haircut ($37.50)',
`minAccRho` FLOAT NOT NULL DEFAULT -1000 COMMENT 'minimum accnt rho (d$/dInt)',
`maxAccRho` FLOAT NOT NULL DEFAULT +1000 COMMENT 'maximum accnt rho (d$/dInt)',
`minDDelta` INT NOT NULL DEFAULT 1000000 COMMENT 'min accnt $delta',
`maxDDelta` INT NOT NULL DEFAULT 1000000 COMMENT 'max accnt $delta',
`maxAccAbsWtVega` FLOAT NOT NULL DEFAULT 10000 COMMENT '(xRM) max account abs wtVega (sum of abs{symbol net wtVega});wtVega = ve * vol / sqrt(max(0.1, years * 4))',
`minAccWtVega` FLOAT NOT NULL DEFAULT -1000 COMMENT '(xRM) minimum accnt net wtVega',
`maxAccWtVega` FLOAT NOT NULL DEFAULT +1000 COMMENT '(xRM) maximum accnt net wtVega',
`minIndWtVega` FLOAT NOT NULL DEFAULT -1000 COMMENT '(xRM) minimum ind (0) net wtVega (applies to each industry unless overriden by an IndustryControl record)',
`maxIndWtVega` FLOAT NOT NULL DEFAULT +1000 COMMENT '(xRM) maximum ind (0) net wtVega (applies to each industry unless overriden by an IndustryControl record)',
`minSubWtVega` FLOAT NOT NULL DEFAULT -1000 COMMENT '(xRM) minimum sub (00) net wtVega (applies to each subIndustry unless overriden by an IndustryControl record)',
`maxSubWtVega` FLOAT NOT NULL DEFAULT +1000 COMMENT '(xRM) maximum sub (00) net wtVega (applies to each subIndustry unless overriden by an IndustryControl record)',
`minGrpWtVega` FLOAT NOT NULL DEFAULT -1000 COMMENT '(xRM) minimum grp (000) net wtVega (applies to each indGroup unless overriden by an IndustryControl record)',
`maxGrpWtVega` FLOAT NOT NULL DEFAULT +1000 COMMENT '(xRM) maximum grp (000) net wtVega (applies to each indGroup unless overriden by an IndustryControl record)',
`userText` TINYTEXT NOT NULL DEFAULT '' COMMENT 'free form text',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
PRIMARY KEY USING HASH (`accnt`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';

SELECT TABLE EXAMPLE QUERY

SELECT
`accnt`,
`clientFirm`,
`bookStatus`,
`bookRiskMultiplier`,
`maxAccHaircut`,
`minAccRho`,
`maxAccRho`,
`minDDelta`,
`maxDDelta`,
`maxAccAbsWtVega`,
`minAccWtVega`,
`maxAccWtVega`,
`minIndWtVega`,
`maxIndWtVega`,
`minSubWtVega`,
`maxSubWtVega`,
`minGrpWtVega`,
`maxGrpWtVega`,
`userText`,
`timestamp`
FROM `SRControl`.`MsgBookControl`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

UPDATE TABLE EXAMPLE QUERY

UPDATE `SRControl`.`MsgBookControl` 
SET
/* Replace with a ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') */
`bookStatus` = 'TwoWay',
/* Replace with a FLOAT */
`bookRiskMultiplier` = 1.23,
/* Replace with a FLOAT */
`maxAccHaircut` = 1.23,
/* Replace with a FLOAT */
`minAccRho` = 1.23,
/* Replace with a FLOAT */
`maxAccRho` = 1.23,
/* Replace with a INT */
`minDDelta` = 5,
/* Replace with a INT */
`maxDDelta` = 5,
/* Replace with a FLOAT */
`maxAccAbsWtVega` = 1.23,
/* Replace with a FLOAT */
`minAccWtVega` = 1.23,
/* Replace with a FLOAT */
`maxAccWtVega` = 1.23,
/* Replace with a FLOAT */
`minIndWtVega` = 1.23,
/* Replace with a FLOAT */
`maxIndWtVega` = 1.23,
/* Replace with a FLOAT */
`minSubWtVega` = 1.23,
/* Replace with a FLOAT */
`maxSubWtVega` = 1.23,
/* Replace with a FLOAT */
`minGrpWtVega` = 1.23,
/* Replace with a FLOAT */
`maxGrpWtVega` = 1.23,
/* Replace with a TINYTEXT */
`userText` = 'dummy tiny text',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

INSERT TABLE EXAMPLE QUERY

INSERT INTO `SRControl`.`MsgBookControl`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') */
`bookStatus`,
/* Replace with a FLOAT */
`bookRiskMultiplier`,
/* Replace with a FLOAT */
`maxAccHaircut`,
/* Replace with a FLOAT */
`minAccRho`,
/* Replace with a FLOAT */
`maxAccRho`,
/* Replace with a INT */
`minDDelta`,
/* Replace with a INT */
`maxDDelta`,
/* Replace with a FLOAT */
`maxAccAbsWtVega`,
/* Replace with a FLOAT */
`minAccWtVega`,
/* Replace with a FLOAT */
`maxAccWtVega`,
/* Replace with a FLOAT */
`minIndWtVega`,
/* Replace with a FLOAT */
`maxIndWtVega`,
/* Replace with a FLOAT */
`minSubWtVega`,
/* Replace with a FLOAT */
`maxSubWtVega`,
/* Replace with a FLOAT */
`minGrpWtVega`,
/* Replace with a FLOAT */
`maxGrpWtVega`,
/* Replace with a TINYTEXT */
`userText`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_accnt',
'Example_clientFirm',
'TwoWay',
1.23,
1.23,
1.23,
1.23,
5,
5,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
'dummy tiny text',
'2022-01-01 12:34:56.000000'
);

DELETE TABLE EXAMPLE QUERY

DELETE FROM `SRControl`.`MsgBookControl` 
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='BookControl' ORDER BY ordinal_position ASC;